﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using static OfficeOpenXml.ExcelErrorValue;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 关于卖家库存余额的信息
    /// </summary>
    /// 
    public class SupOrderDTO
    {

        public List<OZ_SupOrder> orders { get; set; }
        public List<OZ_Warehouses> warehouses { get; set; }

    }


    public class OZ_SupOrder
    {
        public string RowId { get; set; }
        /// <summary>
        /// id	
        /// </summary>
        public string id { get; set; }
        /// <summary>
        ///交货单ID
        /// </summary>
        public string supply_order_id { get; set; }
        /// <summary>
        /// 交货单号	
        /// </summary>
        public string supply_order_number { get; set; }
        /// <summary>
        /// 创建时间	
        /// </summary>
        public string creation_date { get; set; }
        /// <summary>
        /// 状态	
        /// </summary>
        public string state_;
        public string state
        {

            get { return state_; }

            set
            {
                if (value == "ORDER_STATE_UNSPECIFIED") state_ = "无状态";
                else if (value == "ORDER_STATE_DATA_FILLING") state_ = "信息填写";
                else if (value == "ORDER_STATE_READY_TO_SUPPLY") state_ = "准备发货";
                else if (value == "ORDER_STATE_ACCEPTED_AT_SUPPLY_WAREHOUSE") state_ = "装货中";
                else if (value == "ORDER_STATE_IN_TRANSIT") state_ = "运输中";
                else if (value == "ORDER_STATE_ACCEPTANCE_AT_STORAGE_WAREHOUSE") state_ = "收货中";
                else if (value == "ORDER_STATE_REPORTS_CONFIRMATION_AWAITING") state_ = "入库审批";
                else if (value == "ORDER_STATE_REPORT_REJECTED") state_ = "审批拒绝";
                else if (value == "ORDER_STATE_COMPLETED") state_ = "已完成";
                else if (value == "ORDER_STATE_REJECTED_AT_SUPPLY_WAREHOUSE") state_ = "拒接";
                else if (value == "ORDER_STATE_CANCELLED") state_ = "已取消";
                else state_ = value;



            }
        }
        /// <summary>
        /// 	
        /// </summary>
        //public string data_filling_deadline_utc { get; set; }
        /// <summary>
        /// 	
        /// </summary>
        //public string creation_flow { get; set; }
        /// <summary>
        /// 仓库ID	
        /// </summary>
        public string dropoff_warehouse_id { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        public string dropoff_warehouse_name { get; set; }
        /// <summary>
        /// 仓库地址
        /// </summary>
        public string dropoff_warehouse_address { get; set; }
        /// <summary>
        /// 送达时间	
        /// </summary>
        public OZ_timeslot timeslot { get; set; }
        /// <summary>
        /// 司机信息	
        /// </summary>
        public object vehicle { get; set; }
        /// <summary>
        /// 供应商信息	
        /// </summary>
        public List<OZ_supplies> supplies { get; set; }
        /// <summary>
        /// SellerId	
        /// </summary>
        public string can_cancel { get; set; }
        /// <summary>
        /// SellerId	
        /// </summary>
        public string is_econom { get; set; }
        /// <summary>
        /// SellerId	
        /// </summary>
        public string is_virtual { get; set; }
        /// <summary>
        /// SellerId	
        /// </summary>
        public string is_super_fbo { get; set; }
        /// <summary>
        /// SellerId	
        /// </summary>
        public string product_super_fbo { get; set; }


        public class OZ_timeslot
        {
            /// <summary>
            /// 送货信息	
            /// </summary>
            public value_ value { get; set; }



            public class value_
            {
                /// <summary>
                /// 到货时间
                /// </summary>
                public timeslot_ timeslot { get; set; }
                public class timeslot_
                {
                    public string from { get; set; }
                    public string to { get; set; }

                }

                /// <summary>
                /// 时区信息
                /// </summary>
                public timezone_info_ timezone_info { get; set; }
                public class timezone_info_
                {
                    public string offset { get; set; }
                    public string iana_name { get; set; }

                }
            }


        }

    }


    public class OZ_supplies
    {
        /// <summary>
        /// 供应商ID	
        /// </summary>
        public string supply_id { get; set; }
        /// <summary>
        /// 货件ID	
        /// </summary>
        public string bundle_id { get; set; }
        /// <summary>
        /// 存储仓库标识	
        /// </summary>
        public string storage_warehouse_id { get; set; }
        /// <summary>
        /// 供应商状态	
        /// </summary>
        public string supply_state_;
        public string supply_state
        {
            get { return supply_state_; }

            set
            {
                if (value == "SUPPLY_STATE_UNSPECIFIED ") supply_state_ = "无状态";
                else if (value == "SUPPLY_STATE_DATA_FILLING") supply_state_ = "信息填写";
                else if (value == "SUPPLY_STATE_READY_TO_SUPPLY") supply_state_ = "准备发货";
                else if (value == "SUPPLY_STATE_ACCEPTED_AT_SUPPLY_WAREHOUSE") supply_state_ = "装货中";
                else if (value == "SUPPLY_STATE_IN_TRANSIT") supply_state_ = "运输中";
                else if (value == "SUPPLY_STATE_ACCEPTANCE_AT_STORAGE_WAREHOUSE") supply_state_ = "收货中";
                else if (value == "SUPPLY_STATE_REPORTS_CONFIRMATION_AWAITING") supply_state_ = "入库审批";
                else if (value == "SUPPLY_STATE_REPORT_REJECTED") supply_state_ = "审批拒绝";
                else if (value == "SUPPLY_STATE_COMPLETED") supply_state_ = "已完成";
                else if (value == "SUPPLY_STATE_REJECTED_AT_SUPPLY_WAREHOUSE") supply_state_ = "拒收";
                else if (value == "SUPPLY_STATE_CANCELLED") supply_state_ = "已取消";
                else if (value == "SUPPLY_STATE_OVERDUE") supply_state_ = "逾期未交";
                else supply_state_ = value;



            }
        }
        /// <summary>
        /// 供应商标志	
        /// </summary>
        public object supply_tags { get; set; }

    }
}



public class OZ_Warehouses
{
    /// <summary>
    /// 仓库ID	
    /// </summary>
    public string warehouse_id { get; set; }
    /// <summary>
    /// 仓库地址	
    /// </summary>
    public string address { get; set; }
    /// <summary>
    /// 仓库名称	
    /// </summary>
    public string name { get; set; }
}


